<template>
  <div id="app">
    <div>count：{{getCount}}</div>
    <button @click="increment(1)">+</button>
    <button @click="reduce(1)">-</button>
  </div>
</template>

<script>

import { mapGetters, mapActions, mapMutations } from 'vuex'
export default {
  name: 'app',
  methods: {
    ...mapActions(['increment','reduce']),
  },
  computed: {
    ...mapGetters(['getCount'])
  }
}
</script>

<style>
#app {
  font-family: 'Avenir', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
</style>
